Optimal. Leaf size=175 \[ \frac {a \tanh ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a+c x^2}}\right ) (-a e h-a f g+4 c d g)}{8 c^{3/2}}-\frac {\left (a+c x^2\right )^{3/2} \left (4 \left (2 a f h^2+c \left (3 f g^2-5 h (d h+e g)\right )\right )+3 c h x (3 f g-5 e h)\right )}{60 c^2 h}+\frac {x \sqrt {a+c x^2} (4 c d g-a (e h+f g))}{8 c}+\frac {f \left (a+c x^2\right )^{3/2} (g+h x)^2}{5 c h} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.27, antiderivative size = 175, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.185, Rules used = {1654, 780, 195, 217, 206} \[ -\frac {\left (a+c x^2\right )^{3/2} \left (4 \left (2 a f h^2+c \left (3 f g^2-5 h (d h+e g)\right )\right )+3 c h x (3 f g-5 e h)\right )}{60 c^2 h}+\frac {a \tanh ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a+c x^2}}\right ) (-a e h-a f g+4 c d g)}{8 c^{3/2}}+\frac {x \sqrt {a+c x^2} (4 c d g-a (e h+f g))}{8 c}+\frac {f \left (a+c x^2\right )^{3/2} (g+h x)^2}{5 c h} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 195
Rule 206
Rule 217
Rule 780
Rule 1654
Rubi steps
\begin {align*} \int (g+h x) \sqrt {a+c x^2} \left (d+e x+f x^2\right ) \, dx &=\frac {f (g+h x)^2 \left (a+c x^2\right )^{3/2}}{5 c h}+\frac {\int (g+h x) \left ((5 c d-2 a f) h^2-c h (3 f g-5 e h) x\right ) \sqrt {a+c x^2} \, dx}{5 c h^2}\\ &=\frac {f (g+h x)^2 \left (a+c x^2\right )^{3/2}}{5 c h}-\frac {\left (4 \left (2 a f h^2+c \left (3 f g^2-5 h (e g+d h)\right )\right )+3 c h (3 f g-5 e h) x\right ) \left (a+c x^2\right )^{3/2}}{60 c^2 h}+\frac {(4 c d g-a f g-a e h) \int \sqrt {a+c x^2} \, dx}{4 c}\\ &=\frac {(4 c d g-a (f g+e h)) x \sqrt {a+c x^2}}{8 c}+\frac {f (g+h x)^2 \left (a+c x^2\right )^{3/2}}{5 c h}-\frac {\left (4 \left (2 a f h^2+c \left (3 f g^2-5 h (e g+d h)\right )\right )+3 c h (3 f g-5 e h) x\right ) \left (a+c x^2\right )^{3/2}}{60 c^2 h}+\frac {(a (4 c d g-a f g-a e h)) \int \frac {1}{\sqrt {a+c x^2}} \, dx}{8 c}\\ &=\frac {(4 c d g-a (f g+e h)) x \sqrt {a+c x^2}}{8 c}+\frac {f (g+h x)^2 \left (a+c x^2\right )^{3/2}}{5 c h}-\frac {\left (4 \left (2 a f h^2+c \left (3 f g^2-5 h (e g+d h)\right )\right )+3 c h (3 f g-5 e h) x\right ) \left (a+c x^2\right )^{3/2}}{60 c^2 h}+\frac {(a (4 c d g-a f g-a e h)) \operatorname {Subst}\left (\int \frac {1}{1-c x^2} \, dx,x,\frac {x}{\sqrt {a+c x^2}}\right )}{8 c}\\ &=\frac {(4 c d g-a (f g+e h)) x \sqrt {a+c x^2}}{8 c}+\frac {f (g+h x)^2 \left (a+c x^2\right )^{3/2}}{5 c h}-\frac {\left (4 \left (2 a f h^2+c \left (3 f g^2-5 h (e g+d h)\right )\right )+3 c h (3 f g-5 e h) x\right ) \left (a+c x^2\right )^{3/2}}{60 c^2 h}+\frac {a (4 c d g-a f g-a e h) \tanh ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a+c x^2}}\right )}{8 c^{3/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.42, size = 153, normalized size = 0.87 \[ \frac {\sqrt {a+c x^2} \left (-16 a^2 f h-\frac {15 \sqrt {a} \sqrt {c} \sinh ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a}}\right ) (a e h+a f g-4 c d g)}{\sqrt {\frac {c x^2}{a}+1}}+a c (40 d h+5 e (8 g+3 h x)+f x (15 g+8 h x))+2 c^2 x (10 d (3 g+2 h x)+x (5 e (4 g+3 h x)+3 f x (5 g+4 h x)))\right )}{120 c^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.00, size = 329, normalized size = 1.88 \[ \left [\frac {15 \, {\left (a^{2} e h - {\left (4 \, a c d - a^{2} f\right )} g\right )} \sqrt {c} \log \left (-2 \, c x^{2} + 2 \, \sqrt {c x^{2} + a} \sqrt {c} x - a\right ) + 2 \, {\left (24 \, c^{2} f h x^{4} + 40 \, a c e g + 30 \, {\left (c^{2} f g + c^{2} e h\right )} x^{3} + 8 \, {\left (5 \, c^{2} e g + {\left (5 \, c^{2} d + a c f\right )} h\right )} x^{2} + 8 \, {\left (5 \, a c d - 2 \, a^{2} f\right )} h + 15 \, {\left (a c e h + {\left (4 \, c^{2} d + a c f\right )} g\right )} x\right )} \sqrt {c x^{2} + a}}{240 \, c^{2}}, \frac {15 \, {\left (a^{2} e h - {\left (4 \, a c d - a^{2} f\right )} g\right )} \sqrt {-c} \arctan \left (\frac {\sqrt {-c} x}{\sqrt {c x^{2} + a}}\right ) + {\left (24 \, c^{2} f h x^{4} + 40 \, a c e g + 30 \, {\left (c^{2} f g + c^{2} e h\right )} x^{3} + 8 \, {\left (5 \, c^{2} e g + {\left (5 \, c^{2} d + a c f\right )} h\right )} x^{2} + 8 \, {\left (5 \, a c d - 2 \, a^{2} f\right )} h + 15 \, {\left (a c e h + {\left (4 \, c^{2} d + a c f\right )} g\right )} x\right )} \sqrt {c x^{2} + a}}{120 \, c^{2}}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.21, size = 180, normalized size = 1.03 \[ \frac {1}{120} \, \sqrt {c x^{2} + a} {\left ({\left (2 \, {\left (3 \, {\left (4 \, f h x + \frac {5 \, {\left (c^{3} f g + c^{3} h e\right )}}{c^{3}}\right )} x + \frac {4 \, {\left (5 \, c^{3} d h + a c^{2} f h + 5 \, c^{3} g e\right )}}{c^{3}}\right )} x + \frac {15 \, {\left (4 \, c^{3} d g + a c^{2} f g + a c^{2} h e\right )}}{c^{3}}\right )} x + \frac {8 \, {\left (5 \, a c^{2} d h - 2 \, a^{2} c f h + 5 \, a c^{2} g e\right )}}{c^{3}}\right )} - \frac {{\left (4 \, a c d g - a^{2} f g - a^{2} h e\right )} \log \left ({\left | -\sqrt {c} x + \sqrt {c x^{2} + a} \right |}\right )}{8 \, c^{\frac {3}{2}}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 230, normalized size = 1.31 \[ -\frac {a^{2} e h \ln \left (\sqrt {c}\, x +\sqrt {c \,x^{2}+a}\right )}{8 c^{\frac {3}{2}}}-\frac {a^{2} f g \ln \left (\sqrt {c}\, x +\sqrt {c \,x^{2}+a}\right )}{8 c^{\frac {3}{2}}}+\frac {a d g \ln \left (\sqrt {c}\, x +\sqrt {c \,x^{2}+a}\right )}{2 \sqrt {c}}-\frac {\sqrt {c \,x^{2}+a}\, a e h x}{8 c}-\frac {\sqrt {c \,x^{2}+a}\, a f g x}{8 c}+\frac {\left (c \,x^{2}+a \right )^{\frac {3}{2}} f h \,x^{2}}{5 c}+\frac {\sqrt {c \,x^{2}+a}\, d g x}{2}+\frac {\left (c \,x^{2}+a \right )^{\frac {3}{2}} e h x}{4 c}+\frac {\left (c \,x^{2}+a \right )^{\frac {3}{2}} f g x}{4 c}-\frac {2 \left (c \,x^{2}+a \right )^{\frac {3}{2}} a f h}{15 c^{2}}+\frac {\left (c \,x^{2}+a \right )^{\frac {3}{2}} d h}{3 c}+\frac {\left (c \,x^{2}+a \right )^{\frac {3}{2}} e g}{3 c} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.45, size = 169, normalized size = 0.97 \[ \frac {{\left (c x^{2} + a\right )}^{\frac {3}{2}} f h x^{2}}{5 \, c} + \frac {1}{2} \, \sqrt {c x^{2} + a} d g x + \frac {a d g \operatorname {arsinh}\left (\frac {c x}{\sqrt {a c}}\right )}{2 \, \sqrt {c}} + \frac {{\left (c x^{2} + a\right )}^{\frac {3}{2}} e g}{3 \, c} + \frac {{\left (c x^{2} + a\right )}^{\frac {3}{2}} d h}{3 \, c} - \frac {2 \, {\left (c x^{2} + a\right )}^{\frac {3}{2}} a f h}{15 \, c^{2}} + \frac {{\left (c x^{2} + a\right )}^{\frac {3}{2}} {\left (f g + e h\right )} x}{4 \, c} - \frac {\sqrt {c x^{2} + a} {\left (f g + e h\right )} a x}{8 \, c} - \frac {{\left (f g + e h\right )} a^{2} \operatorname {arsinh}\left (\frac {c x}{\sqrt {a c}}\right )}{8 \, c^{\frac {3}{2}}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \left (g+h\,x\right )\,\sqrt {c\,x^2+a}\,\left (f\,x^2+e\,x+d\right ) \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 11.88, size = 384, normalized size = 2.19 \[ \frac {a^{\frac {3}{2}} e h x}{8 c \sqrt {1 + \frac {c x^{2}}{a}}} + \frac {a^{\frac {3}{2}} f g x}{8 c \sqrt {1 + \frac {c x^{2}}{a}}} + \frac {\sqrt {a} d g x \sqrt {1 + \frac {c x^{2}}{a}}}{2} + \frac {3 \sqrt {a} e h x^{3}}{8 \sqrt {1 + \frac {c x^{2}}{a}}} + \frac {3 \sqrt {a} f g x^{3}}{8 \sqrt {1 + \frac {c x^{2}}{a}}} - \frac {a^{2} e h \operatorname {asinh}{\left (\frac {\sqrt {c} x}{\sqrt {a}} \right )}}{8 c^{\frac {3}{2}}} - \frac {a^{2} f g \operatorname {asinh}{\left (\frac {\sqrt {c} x}{\sqrt {a}} \right )}}{8 c^{\frac {3}{2}}} + \frac {a d g \operatorname {asinh}{\left (\frac {\sqrt {c} x}{\sqrt {a}} \right )}}{2 \sqrt {c}} + d h \left (\begin {cases} \frac {\sqrt {a} x^{2}}{2} & \text {for}\: c = 0 \\\frac {\left (a + c x^{2}\right )^{\frac {3}{2}}}{3 c} & \text {otherwise} \end {cases}\right ) + e g \left (\begin {cases} \frac {\sqrt {a} x^{2}}{2} & \text {for}\: c = 0 \\\frac {\left (a + c x^{2}\right )^{\frac {3}{2}}}{3 c} & \text {otherwise} \end {cases}\right ) + f h \left (\begin {cases} - \frac {2 a^{2} \sqrt {a + c x^{2}}}{15 c^{2}} + \frac {a x^{2} \sqrt {a + c x^{2}}}{15 c} + \frac {x^{4} \sqrt {a + c x^{2}}}{5} & \text {for}\: c \neq 0 \\\frac {\sqrt {a} x^{4}}{4} & \text {otherwise} \end {cases}\right ) + \frac {c e h x^{5}}{4 \sqrt {a} \sqrt {1 + \frac {c x^{2}}{a}}} + \frac {c f g x^{5}}{4 \sqrt {a} \sqrt {1 + \frac {c x^{2}}{a}}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________